from flask import Flask
from .api import api
from .admin import admin
from .models import db
from .models import ma
from .view import blog


app = Flask(__name__)
print db
db.init_app(app)

# ma.init_app(app)


app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
app.config['SECRET_KEY'] = 'acos$sJsasdl@lidl_duml^dSdcEx'

app.register_blueprint(api, url_prefix='/api')
app.register_blueprint(admin, url_prefix='/admin')
app.register_blueprint(blog, url_prefix='/blog')
